#include<AT89X52.h>
void Port2_Open()
{
P2=0X0;
}
void Port2_Close()
{
P2=0XFF;
}
void Port2_0_Close()
{
P2_0=0X0;
}
void Delay()
{
unsigned int a;
for(a=60000;a>0;a--)
{
}
}void Port2_1_Close()
{
P2_1=0X0;
}
void Port2_2_Close()
{
P2_2=0X0;
}
void Port2_3_Close()
{
P2_3=0X0;
}
void Port2_4_Close()
{
P2_4=0X0;
}
void Port2_5_Close()
{
P2_5=0X0;
}
void Port2_6_Close()
{
P2_6=0X0;
}
void Port2_7_Close()
{
P2_7=0X0;
}
void main1()
{
int i=0;
 while (1)
      {
  Port2_Close();
  Port2_0_Close();
  Delay();
  Port2_Close();
  Port2_1_Close();
  Delay();
  Port2_Close();
  Port2_2_Close();
  Delay();
  Port2_Close();
  Port2_3_Close();
  Delay();
  Port2_Close();
  Port2_4_Close();
  Delay();
  Port2_Close();
  Port2_5_Close();
  Delay();
  Port2_Close();
  Port2_6_Close();
  Delay();
  Port2_Close();
  Port2_7_Close();
  Delay();
  for(i=0;i<3;i++)
  {
  Port2_Close();
  Delay();
  Port2_Open();
   Delay();
   }
       }
}
